package com.offcn.oauth.controller;




import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;



/**
 * 登录重定向控制器(用户跳转)
 *
 * @author 30389
 * @date 2022/10/13 12:10:21
 */
@Controller
@RequestMapping(value = "/oauth")
public class LoginRedirectController {

    /**
     * 跳转到登录页面
     *
     * @return
     */
    @GetMapping(value = "/login")
    public String Login(@RequestParam(value = "from",required = false,defaultValue = "")String from , Model model) {
        //储存from
        model.addAttribute("from",from);
        return "login";
    }
}
